package com.ktwlsoft.archivemanage.payload.archiveUnit;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

@ApiModel("立档单位更新")
@Getter
@Setter
public class ArchiveUnitUpdateRequest {

    @ApiModelProperty("立档单位Id")
    @NotNull
    private Long unitId;

    /**上级立档单位id**/
    @ApiModelProperty("上级立档单位id")
    private Long pid;

    /**账户外键id**/
    @ApiModelProperty("账户外键id")
    private Long accountId;

    /**立档单位名称**/
    @ApiModelProperty("立档单位名称")
    @Size(max = 20,message = "立档单位名称超长")
    @NotNull(message = "单位名称不能为空")
    private String unitName;

    /**立档单位性质**/
    @ApiModelProperty("立档单位性质")
    private String unitNature;

    /**单位电话**/
    @ApiModelProperty("单位电话")
    @Size(max = 30, message = "单位电话参数超长")
    @Pattern(regexp = "(^\\s*$)|(^1[34578]\\d{9}$)|((^\\d{3,4}|\\d{3,4}-|\\s)?\\d{7,14}$)"
            ,message = "单位电话格式不匹配")
    private String unitTele;

    /**单位图片**/
    @ApiModelProperty("单位图片")
    @Size(max = 100, message = "单位图片参数超长")
    private String unitImg;

    /**账号(小程序)**/
    @ApiModelProperty("账号(小程序)")
    @Size(max = 30, message = "账号(小程序)参数超长")
    @NotNull(message = "账号不能为空")
    private String account;

    /**账号状态(1启用，0禁用)**/
    @ApiModelProperty("账号状态(1启用，0禁用)")
    @NotNull(message = "账号状态不能为空")
    private Boolean enable;

    /**地址**/
    @ApiModelProperty("地址")
    @Size(max = 50, message = "地址参数超长")
    private String address;

    /**单位证件(ORGANIZE_CODE(组织机构代码), BUSINESS_LISENCE(营业执照))**/
    @ApiModelProperty("单位证件(ORGANIZE_CODE(组织机构代码), BUSINESS_LISENCE(营业执照))")
    @Size(max = 30, message = "单位证件(ORGANIZE_CODE(组织机构代码), BUSINESS_LISENCE(营业执照))参数超长")
    private String unitIdentityType;

    /**单位证件号**/
    @ApiModelProperty("单位证件号")
    @Size(max = 50, message = "单位证件号参数超长")
    @Pattern(regexp = "(^\\s*$)|(^\\w*$)",message = "单位证件号格式不匹配")
    private String unitIdentityNum;

    /**备注**/
    @ApiModelProperty("备注")
    @Size(max = 30, message = "备注参数超长")
    private String remark;

    /**密码**/
    @ApiModelProperty("密码")
    @Size(max = 30, message = "密码参数超长")
    private String password;

    /**头像**/
    @ApiModelProperty("头像")
    @Size(max = 100, message = "头像参数超长")
    private String profile;
}
